paned: Draw handle separator at the right location
authorTimm Bäder <mail@baedert.org>
Sun, 18 Jun 2017 08:13:11 +0000 (10:13 +0200)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 20 Jul 2017 01:27:14 +0000 (21:27 -0400)
gtk/gtkpaned.c

index b9fa6445eb58858593609c64560c7164fee4c990..463a8c8d3b9f9cca8d9e0fc8361398c25c6f88ce 100644 (file)
@@ -1473,25 +1473,15 @@ gtk_paned_render_handle (GtkGizmo    *gizmo,
 {
   GtkWidget *widget = GTK_WIDGET (gizmo);
   GtkCssStyle *style = gtk_css_node_get_style (gtk_widget_get_css_node (widget));
-  GtkAllocation content_alloc;
-  GtkAllocation widget_alloc;
-  int x, y;
+  int width, height;
 
-  gtk_widget_get_content_allocation (widget, &content_alloc);
-  gtk_widget_get_allocation (widget, &widget_alloc);
-
-  x = content_alloc.x - widget_alloc.x;
-  y = content_alloc.y - widget_alloc.y;
-
-  gtk_snapshot_offset (snapshot, x, y);
+  gtk_widget_get_content_size (widget, &width, &height);
 
   gtk_css_style_snapshot_icon (style,
                                snapshot,
-                               content_alloc.width, content_alloc.height,
+                               width, height,
                                GTK_CSS_IMAGE_BUILTIN_PANE_SEPARATOR);
 
-  gtk_snapshot_offset (snapshot, -x, -y);
-
   return FALSE;
 }